🎖️GitЯра🎖️
Node / meshtastic / Meshtastic-Android / files / build-logic / convention / src / main / kotlin / KmpFeatureConventionPlugin.kt
Displaying Raw • Download
build-logic/convention/src/main/kotlin/KmpFeatureConventionPlugin.kt bd2863243bab6eb213401d949839a2bc74dde7e2 (bd286324) Text, 3.51 KB
T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72import T7ee787org.gradle.api.Plugin
Tff7b72import T7ee787org.gradle.api.Project
Tff7b72import T7ee787org.gradle.kotlin.dsl.apply
Tff7b72import T7ee787org.gradle.kotlin.dsl.configure
Tff7b72import T7ee787org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
Tff7b72import T7ee787org.meshtastic.buildlogic.library
Tff7b72import T7ee787org.meshtastic.buildlogic.libs
T8b949e/**
* Convention plugin for KMP feature modules.
*
* Composes [KmpLibraryConventionPlugin], [KmpLibraryComposeConventionPlugin], and [KoinConventionPlugin] and wires the
* common Compose / Lifecycle / Koin dependencies that every feature module needs. Feature `build.gradle.kts` files only
* declare their module-specific deps.
*
* Modelled after the `AndroidFeatureImplConventionPlugin` pattern from
* [Now in Android](https://github.com/android/nowinandroid).
*/
Tff7b72class T56d364KmpFeatureConventionPlugin Tb4b4b4: Te6edf3PluginTff7b72<Te6edf3ProjectTff7b72> Tb4b4b4{
Tff7b72override Tff7b72fun Td2a8ffapplyTb4b4b4(Te6edf3targetTb4b4b4: Te6edf3ProjectTb4b4b4) Tb4b4b4{
Te6edf3withTb4b4b4(Te6edf3targetTb4b4b4) Tb4b4b4{
Te6edf3applyTb4b4b4(Te6edf3plugin Tff7b72= Ta5d6ff"Ta5d6ffmeshtastic.kmp.libraryTa5d6ff"Tb4b4b4)
Te6edf3applyTb4b4b4(Te6edf3plugin Tff7b72= Ta5d6ff"Ta5d6ffmeshtastic.kmp.library.composeTa5d6ff"Tb4b4b4)
Te6edf3applyTb4b4b4(Te6edf3plugin Tff7b72= Ta5d6ff"Ta5d6ffmeshtastic.koinTa5d6ff"Tb4b4b4)
Te6edf3extensionsTb4b4b4.Te6edf3configureTff7b72<Te6edf3KotlinMultiplatformExtensionTff7b72> Tb4b4b4{
Te6edf3sourceSetsTb4b4b4.Te6edf3getByNameTb4b4b4(Ta5d6ff"Ta5d6ffcommonMainTa5d6ff"Tb4b4b4)Tb4b4b4.Te6edf3dependencies Tb4b4b4{
T8b949e// Compose Multiplatform UI
Te6edf3implementationTb4b4b4(Te6edf3libsTb4b4b4.Te6edf3libraryTb4b4b4(Ta5d6ff"Ta5d6ffcompose-multiplatform-animationTa5d6ff"Tb4b4b4)Tb4b4b4)
Te6edf3implementationTb4b4b4(Te6edf3libsTb4b4b4.Te6edf3libraryTb4b4b4(Ta5d6ff"Ta5d6ffcompose-multiplatform-foundationTa5d6ff"Tb4b4b4)Tb4b4b4)
Te6edf3implementationTb4b4b4(Te6edf3libsTb4b4b4.Te6edf3libraryTb4b4b4(Ta5d6ff"Ta5d6ffcompose-multiplatform-material3Ta5d6ff"Tb4b4b4)Tb4b4b4)
T8b949e// Navigation 3 (JetBrains KMP fork — safe in commonMain)
Te6edf3implementationTb4b4b4(Te6edf3libsTb4b4b4.Te6edf3libraryTb4b4b4(Ta5d6ff"Ta5d6ffjetbrains-navigation3-uiTa5d6ff"Tb4b4b4)Tb4b4b4)
T8b949e// Lifecycle & ViewModel (JetBrains KMP forks — safe in commonMain)
Te6edf3implementationTb4b4b4(Te6edf3libsTb4b4b4.Te6edf3libraryTb4b4b4(Ta5d6ff"Ta5d6ffjetbrains-lifecycle-viewmodel-composeTa5d6ff"Tb4b4b4)Tb4b4b4)
Te6edf3implementationTb4b4b4(Te6edf3libsTb4b4b4.Te6edf3libraryTb4b4b4(Ta5d6ff"Ta5d6ffjetbrains-lifecycle-runtime-composeTa5d6ff"Tb4b4b4)Tb4b4b4)
T8b949e// Koin ViewModel wiring
Te6edf3implementationTb4b4b4(Te6edf3libsTb4b4b4.Te6edf3libraryTb4b4b4(Ta5d6ff"Ta5d6ffkoin-compose-viewmodelTa5d6ff"Tb4b4b4)Tb4b4b4)
T8b949e// Logging
Te6edf3implementationTb4b4b4(Te6edf3libsTb4b4b4.Te6edf3libraryTb4b4b4(Ta5d6ff"Ta5d6ffkermitTa5d6ff"Tb4b4b4)Tb4b4b4)
T8b949e// @Preview available in commonMain since CMP 1.11 (androidx.compose.ui.tooling.preview.Preview)
T8b949e// org.jetbrains.compose.ui.tooling.preview.Preview is deprecated in 1.11
Te6edf3implementationTb4b4b4(Te6edf3libsTb4b4b4.Te6edf3libraryTb4b4b4(Ta5d6ff"Ta5d6ffcompose-multiplatform-ui-tooling-previewTa5d6ff"Tb4b4b4)Tb4b4b4)
Tb4b4b4}
Te6edf3sourceSetsTb4b4b4.Te6edf3getByNameTb4b4b4(Ta5d6ff"Ta5d6ffandroidMainTa5d6ff"Tb4b4b4)Tb4b4b4.Te6edf3dependencies Tb4b4b4{
Te6edf3implementationTb4b4b4(Te6edf3libsTb4b4b4.Te6edf3libraryTb4b4b4(Ta5d6ff"Ta5d6ffandroidx-activity-composeTa5d6ff"Tb4b4b4)Tb4b4b4)
Te6edf3implementationTb4b4b4(Te6edf3libsTb4b4b4.Te6edf3libraryTb4b4b4(Ta5d6ff"Ta5d6ffcompose-multiplatform-uiTa5d6ff"Tb4b4b4)Tb4b4b4)
Tb4b4b4}
Te6edf3sourceSetsTb4b4b4.Te6edf3getByNameTb4b4b4(Ta5d6ff"Ta5d6ffcommonTestTa5d6ff"Tb4b4b4)Tb4b4b4.Te6edf3dependencies Tb4b4b4{ Te6edf3implementationTb4b4b4(Te6edf3projectTb4b4b4(Ta5d6ff"Ta5d6ff:core:testingTa5d6ff"Tb4b4b4)Tb4b4b4) Tb4b4b4}
Tb4b4b4}
Tb4b4b4}
Tb4b4b4}
Tb4b4b4}
Served by rngit 1.5.0 - Generated in 0.04s